package com.kawa.kemanage.service.impl;

import com.kawa.kemanage.entity.ViolatedContent;
import com.kawa.kemanage.mapper.ViolatedContentMapper;
import com.kawa.kemanage.service.ViolatedContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class ViolatedContentServiceImpl implements ViolatedContentService {

    @Autowired
    private ViolatedContentMapper violatedContentMapper;

    @Override
    public List<ViolatedContent> search(
            String contentId,
            String violationType,
            String handleStatus,
            LocalDate startDate,   // 新增
            LocalDate endDate       // 新增
    ) {
        return violatedContentMapper.search(
                contentId,
                violationType,
                handleStatus,
                startDate,
                endDate
        );
    }

    @Override
    public void markAsHandled(Long id) {
        violatedContentMapper.markAsHandled(id);
    }
}